#ifndef __BRANCH1_BASE_TRIGGER_ACTION_H__
#define __BRANCH1_BASE_TRIGGER_ACTION_H__
#include "Branch1BaseConfig.h"

namespace DAISY
{
	class _BranchBaseExport TriggerCallback
	{
	public:
		virtual void triggerAction(int id, Event * evt) = 0;
		virtual ~TriggerCallback(void){}
	};


	class _BranchBaseExport TriggerAction
	{
	public:
		virtual void operator()(int id, Event * evt) = 0;
	private:
		TriggerCallback * _callBack;
		void * _userData;
	};

	class _BranchBaseExport TriggerActionCallback:public TriggerAction
	{
	public:
		TriggerActionCallback(TriggerCallback * callback):_callback(callback) 
		{
			assert(callback);
		}

		virtual void operator()(int id, Event * evt)
		{
			_callback->triggerAction(id, evt);
		}
	private:
		TriggerCallback * _callback;
	};

}


#endif

